package cn.edu.zsc.rbac.domain.vo;

/**
 * 业务层返回给视图层的数据格式
 *
 * @author 郑静丽
 * @since 2025/4/20 21:19
 */
public class Result {
    /**
     * 操作是否成功
     */
    public boolean success;
    /**
     * 响应消息
     */
    public String message;
    /**
     * 响应数据
     */
    public Object data;

    public static Result failure(String message) {
        Result result = new Result();
        result.message = message;
        return result;
    }
    public static Result success(String message,Object data){
            Result result = new Result();
            result.success = true;
            result.message = message;
            result.data = data;
            return result;

        }
    }
